package com.heima.apis.wemedia;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Xiao
 * @version 1.0
 * @description
 * @date 2021/11/29
 */
@FeignClient("leadnews-wemedia")
public interface IWmSensitiveClient {
    /**
     * 查询敏感词列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/sensitive/list")
    Page getList(@RequestBody SensitiveDto dto);

    /**
     * 删除敏感词
     * @param id
     * @return
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    ResponseResult delSensitive(@PathVariable Integer id);

    /**
     * 添加敏感词
     * @param adSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/save")
    ResponseResult saveSensitive(@RequestBody WmSensitive adSensitive);

    /**
     * 修改敏感词
     * @param adSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/update")
    ResponseResult updateSensitive(@RequestBody WmSensitive adSensitive);
}
